package com.imooc.order.exception;

import com.imooc.order.enums.ResultEnum;

/**
 * @author wy
 * @version 1.0
 * @date 2020/3/5 12:08
 * @description
 **/
public class OrderException extends RuntimeException{
    private Integer code;

    public OrderException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public OrderException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
